<template>
  <div class="header">
    <span  @click="back"><slot name="left"></slot></span>
    <span><slot name="center"></slot></span>
    <span style="color:rgb(34,190,255);"><slot name="right"></slot></span>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router';
let router=useRouter()
let back=()=>{
    router.go(-1)
}
</script>

<style lang="scss">
.header{
    background-color: #fff;
    height: 50px;
    line-height: 50px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    border-bottom: 1px solid #ccc;
}
</style>
